cmake_minimum_required(VERSION 3.4.1)
project(main)

include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()

# 导入库
add_subdirectory(libs/zjtools)

set(MY_MICRO "-Wall -Wextra -DZJ_DEBUG_MAIN")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${MY_MICRO}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${MY_MICRO}")

add_library(main SHARED
    src/android_main.cpp
    src/engine.hpp
    src/engine.cpp
)

target_link_libraries(main
    android
    log
    EGL
    GLESv3
    android_native_app_glue
    zjtools
)
